System and method for gain regulation

ABSTRACT

Disclosed herein is a system for fast gain regulation in a gamma-ray spectroscopy instrument. The system includes a detector configured to generate a signal indicative of energy arriving at the detector, and a processor configured to determine one or more system performance indicators. The system also includes a controller configured to compute a first gain correction term based on one of more system performance indicators and change the device gain based on the computed first gain correction term.

CROSS-REFERENCE TO RELATED APPLICATIONS

This patent application is a continuation of, and claims the benefit of,U.S. patent application Ser. No. 14/116,315, published on May 29, 2014as US2014/0145072, which is a U.S. national phase application ofPCT/US12/38357, filed on May 17, 2012 and published on Nov. 22, 2012 asWO2012/0158922, which in turn claims the priority of U.S. ProvisionalPatent Application Ser. No. 61/487010, filed on May 17, 2011, the entirecontents of which are hereby incorporated by reference into the currentapplication.

BACKGROUND

In nuclear measurements it is frequently helpful to determine the energythat a particle or photon has deposited in a detection device. Thesedetection devices provide an electrical signal indicative of the amountof energy deposited in a single event. The energy distribution of theseevents, for example gamma rays from a multitude of elements, can berepresented as a histogram, in which the abscissa represents thedeposited energy or a function thereof, and the ordinate represents thenumber of events having a signal which falls into one of the discreteenergy bins of the abscissa.

There are many variants of nuclear detectors. A nuclear detectortypically includes the detecting material itself and devices to convertand/or amplify the signal. Such detectors can be semiconductor detectorssuch as Ge-detectors, scintillation detectors coupled to photondetectors, proportional counters, etc.

The purpose of a gamma ray spectroscopy system is to determine theenergy associated with the absorption of incident gamma rays by thedetector in what is referred to herein as pulse events. Pulse events canbe registered in histograms organized by energy levels (Multi-ChannelAnalyzer, MCA spectra) and/or times of arrival (Multi-Channel Scaler,MCS spectra). The performance of such systems is measured in terms ofenergy resolution (i.e., ability to distinguish between separate butadjacent energy levels), time resolution (i.e., ability to distinguishbetween nearly coincident pulses), throughput (i.e., ability to processmultiple adjacent pulses) and linearity (i.e., the linear relationshipbetween deposited energy from a pulse and associated histogram channel).

Higher performance is achieved at higher count rates, or throughput, andhigher energy resolution. Such systems can generally perform a specifiedmeasurement faster than slower systems and/or those with poorerresolution. This is due to both improved statistical uncertainties fromthe larger number of events counted and measured, and the ability tobetter separate energy peaks and features in the measured spectrum.

Referring to FIG. 1, a prior art gamma ray spectroscopy system 100includes a scintillator detector 102 coupled to a photon-electronconverter 104, a bias supply 106, pre-amplifier 108, shaping amplifiers110, a pulse height/MCS analyzer 112, histogram acquisition memory 114,controller 116, user interface 118, network interface 120, and recordingmemory 122. These spectroscopy systems have applications in manyindustries and sciences. Some applications involve a stationarymeasurement in a lab, where a stable measurement can be performed undercontrolled conditions.

One particular application of interest is well logging. The detectormoves through a subterranean borehole using various modes of conveyanceto traverse rock formations of varying minerals, fluids, and structure.High performance systems can traverse the formations faster, achievingbetter statistical uncertainties and measurement quality than lessperformant systems. This is desirable for reducing the overall cost ofmeasurement, especially if the measurement is performed in conditionswhere time in the borehole is costly, such as deepwater drilling rigs orhigh volume drilling operations. Related applications include fluid flow(pipeline) or material flow (conveyor) where the spectroscopy system maybe stationary, but the material in the volume of investigation iscontinually changing due to material motion.

Methods to keep the histogram calibrated such that each bin is alignedwith a specified energy range are known in the art as techniques forgain regulation. These methods usually adjust the gain of theacquisition system such that electrical signal amplitudes correspondingto each bin are properly aligned with gamma ray energies.

Accurate and stable gain regulation is critical for high performancespectroscopy systems, which typically have high count rate and highresolution specifications. However, in some applications such as welllogging, the count rate is not only very high, but also highly variable.The energy distribution of the count rates may also vary as the measuredvolume around the detector changes. For a given bias supply setting, theenergy calibration of the detector and associated devices may vary withcount rate or energy distribution. This can be due to “loading” of thedetection devices as the cumulative amount of charge changes, which mayalter device characteristics such as gain. Or it could be due to signalprocessing effects in the system, which may vary with count rate orenergy distribution.

If the system gain varies with count rate, then the acquired spectrumwill be distorted. Often this will appear as if the energy resolution ofthe system is degraded. Small gain variations may impair statisticaluncertainty during analysis of the spectrum, as peaks will be broadened.Larger gain variations may render the spectrum unusable, by creatingmultiple peaks or other distortions beyond the capability of typicalspectroscopy processing algorithms. For high performance systems, it iscritically important to prevent count rate induced variations fromdistorting the spectrum.

Gain regulation may operate by acquiring a spectrum for a long enoughtime to detect a spectral feature such as an energy peak or edge. Energybins in the spectrum may have acquired enough counts that statisticaluncertainty is small enough to compare bins and evaluate features.Techniques employed in the art include moments, peak detection, peakfitting, fitting of standards (unique spectral shapes for each elementencountered), and so on. Some such methods may use considerableprocessing to be performed on the measured spectrum, which translatesinto additional delay before a correction can be applied to the system.

In most cases, the time spent to acquire a spectrum for gain analysis islonger than the time to perform individual measurements, and much longerthan the time the logging equipment spends in the vicinity of a samplevolume. For example, the logging device may move axially through theborehole at 1 foot per second. A typical volume of investigation spansapproximately one foot or so axially. Spectra are acquired at perhaps0.5 second intervals. Thus spectra may be changing significantly every 1to 2 seconds as new volumes of rock are sampled.

However, some gain analysis techniques may use 5 to 10 seconds of datato achieve usable statistical precision. In some existing systems 60seconds or more are used. Most closed loop control algorithms useseveral iterations to correct an error, so the response time of typicalgain regulation algorithms is far too slow (20 seconds or more) tocompensate for gain variations due to the rate (1 to 2 seconds) at whichmaterials are measured. By the time a typical closed loop gainregulation algorithm has detected and compensated for a gain change, thecondition stimulating the change may be long past.

The severity of the distortion to the measured spectra may depend onlogging speed (rate of traversal), variations in successive formations,gain sensitivity of the spectroscopy system to count rate variation,energy resolution, and the speed of the control loops. High performancesystems typically move faster through the formations, typically use veryhigh count rates which may increase gain sensitivity to count ratevariation, and have very fine energy resolution—which reduces thetolerance to gain variations.

Some regulation algorithms have been designed to accurately adjust thegain of the acquisition system over the long term, compensating for slowdrift such as temperature changes. Such algorithms are, however, usuallyinadequate for short term gain changes, especially since a gain changemay first be detected before it can be corrected. A method is needed toadjust the system gain in the short term (between the slower controlupdates from the traditional techniques), and make the appropriatechanges to compensate for stimuli that affect the system gain withoutdisrupting the slow, but accurate control provided by the traditionaltechniques.

SUMMARY

Disclosed herein is a system for fast gain regulation in a gamma-rayspectroscopy instrument. The system may include a detector configured togenerate a signal indicative of energy arriving at the detector, and aprocessor configured to determine one or more system performanceindicators. The system may also include a controller configured tocompute a first gain correction term based on one of more systemperformance indicators and change the device gain based on the computedfirst gain correction term.

Also disclosed herein is a method for fast gain regulation. The methodmay include applying a voltage to a detector of a spectrum acquisitiontool, and acquiring an energy spectrum with the spectrum acquisitiontool. The method may further include during a first time period,detecting one or more system performance indicators and adjusting thevoltage by a first amount relating to the one or more system performanceindicators. The method may also include during a second time period,detecting a gain error based on the energy spectrum acquired andadjusting the voltage by a second amount relating to the gain error. Thefirst time period may be shorter than the second time period, and thesecond time period may comprise the time to acquire the energy spectrumwith pre-determined statistical precision.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a block diagram for a prior gamma-ray spectroscopyacquisition system.

FIG. 2 shows a block diagram for an illustrative spectroscopy system inaccordance with one embodiment of the present disclosure.

FIG. 3 shows a graph of experimental results for high voltage changeused to correct for gain errors induced by changes in total integratedcharge, plotted versus total integrated charge, in a system such as thatshown in FIG. 2.

FIG. 4 shows a block diagram for an illustrative overall system gainregulation with a fast open-loop correction in parallel with a slowclosed-loop correction.

FIG. 5 shows a log of Example Well #1 (70 ft.) having a stack of shorttest formations with varying properties, resulting in rapid changes incount rate over short vertical distances. The log shows the performanceof the gain regulation system in accordance with an embodiment of thepresent disclosure.

FIG. 6 shows a log of Example Well #2 (300 ft.) having several rapidtransitions separated by long stretches of slowly varying formations,and a sharp transition from open borehole to cased borehole. The logshows the performance of the gain regulation system in accordance withan embodiment of the present disclosure.

FIG. 7 a second log of Example Well #2 in a second area of evaluation.The log shows the performance of the gain regulation system inaccordance with an embodiment of the present disclosure.

DETAILED DESCRIPTION

In the following description, numerous details are set forth to providean understanding of the present disclosure. However, it will beunderstood by those skilled in the art that the following may bepracticed without these details and that numerous variations ormodifications from the described embodiments are possible.

A method is presented here which addresses the issue of gain regulationbeing too long term by using information gathered at faster rates todetermine an additional correction term which can be combined with theslower correction from a prior art closed loop technique. The methodpresented by this disclosure uses an open loop approach which does notrely on real-time analysis of gain change.

The method of the present disclosure is built around a traditional gainregulation approach in which a spectrum is acquired until sufficientstatistical precision is reached, then the energy calibration of thespectrum is analyzed to determine gain error of the system, and acorrection (typically bias voltage adjustment) is applied to the system.The control loop repeats indefinitely to maintain the energy calibrationof the spectroscopy system.

The method adds a faster or more responsive gain regulation by measuringat a faster rate a term that may influence system gain. Such terms mayinclude total count rate, peak count rate, total detector current, orother “system performance indicators” from the spectroscopy system.These indicators can be sampled at much higher rates with much betterprecision than individual energy bins in a spectrum, since they arebased on a larger number of events—often the totality of the spectrum.The selection of such terms will depend on the system, especially thedetector.

The relationship between the “system performance indicator” term (e.g.total count rate) and relative corrections (e.g. bias voltage change)can be determined in advance by experiment for the system design or forindividual systems. Because this is an incremental correction, accuracyis not as critical as for the slower closed loop system. The indicatoris measured, that value is transformed to a relative correction(typically small), and the correction is added to the closed loopsetting (e.g. bias voltage) during the faster open loop cycle. In eachsuccessive open loop cycle, a new relative correction is computed andapplied in place of the prior open loop correction. The result is a slowloop to maintain closed loop accuracy and a fast loop to provideempirical open loop corrections to fast changing conditions.

Gain regulation is critical for spectroscopy systems, especially in welllogging. For the many modes of conveyance available—wireline, loggingwhile drilling, logging while tripping, casing drilling, slick line,drill-pipe conveyed, tubing conveyed, free-fall, or any other mode,spectroscopy logging usually acquires spectral data in time incrementswhich are then aligned to depth. If the energy calibrations of themerged spectra are not the same, then spectral quality will be degraded,as will subsequent spectroscopy processing. Further degradation mayoccur when the data from multiple depths are combined during stacking orfiltering calculations. Typical effects are reduced resolution andincreased statistical uncertainties of results, or worse.

One potential approach may employ significant pre-processing of eachtime-based spectrum, but gain (and offset and linearity) corrections onspectra with low total counts increase risk of bad fits and spuriouserrors. Such pre-processing uses significant computing power anddevelopment effort. An alternate potential solution is to post-processthe depth-based spectra before filtering in hopes of minimizingdegradation, but the time-based merge already includes distortions,especially for larger time intervals.

An optimal approach is to maintain the energy calibration of thespectroscopy acquisition system such that all spectra are acquired withthe same energy calibration. This can be achieved by combiningtraditional closed-loop gain regulation techniques to provide long termaccuracy (such as thermal drift) with fast techniques, such asopen-loop, to compensate for other error sources such as varying countrate. The compensation may occur in real-time, without observable delay.Such a system is described here.

The goal is to keep all spectra acquired from the system 200 shown inFIG. 2 within gain regulation specifications. The system 200 includes afast scintillator 202 (such as a LaBr3:Ce crystal) detecting gamma raysand emitting photons. The scintillator 202 is coupled to aphoto-multiplier tube 204 (PMT) converting photons to electrons. A biassupply 206 coupled to the PMT 204 (i.e., a controllable high voltagesupply) and a pre-amplifier 208 sensing the current from the PMT 204. Apulse-height analyzer 210 (PHA), or processor, uses analog and digitalelectronics to convert the pre-amplifier signal into digital dataindicative of the height or integral of the detected gamma-ray signal.The system 200 also includes a histogrammer 212 to count the number ofgamma-ray events in each energy bin in spectra and a controller 214 tomanage the system 200, communicate data and commands, and executecontrol algorithms. The system 200 also includes an optional telemetrychannel 216 for communication to another computer, and a recording ormemory device 218 for storing acquired data.

The system 200 is designed to acquire data fast enough to traversesubterranean formations at 1 foot per second, and to produce spectraevery 0.5 feet, thus every 0.5 seconds.

Traditional gain regulation is implemented by running an algorithm onthe controller (or in electronics) that acquires spectra and analyzesthe spectra to determine gain or gain error. (e.g. determining whether agamma-ray peak in the correct bin, and if not, how far from the correctbin has the peak deviated?) The resulting error is used to adjust thebias supply (high voltage or HV) to the PMT 204. Depending on thespectral calculation being performed, this process repeats every 3 to 10seconds or more—much slower than the rate at which formations are beingtraversed. A faster method is needed to handle gain variation betweenupdates from the traditional gain regulation algorithm.

Increasing the HV increases the PMT gain, and hence the energycalibration of the entire system, and vice versa. Because of themulti-stage design of PMTs, over a limited voltage range, gain gtypically follows a power law g=c·V^(n), where n is related to thenumber of PMT gain stages (dynodes), and can easily reach electron gainsof 10⁴ or higher.

PMT gain is known to vary not only with HV, but also with temperature,count rate, average anode current, etc. Temperature drift is readilyhandled by traditional gain regulation techniques and HV is undercontrol of the gain regulation algorithm. However, count rate variationspose considerable challenges for a high performance spectroscopy system.Count rate may vary due to source intensity changes (especially withneutron generators) or changing environment around the detector as foundin well logging. Effects such as this have been observed in manyspectroscopy systems.

In one experiment, with count rates varying +/−25%, PMT gain wasobserved to change +/−2%. This resulted in notable distortions incalculations of the acquired spectra requiring non-standard expertre-processing to correct the distortions.

For higher performance spectroscopy systems, gain accuracy is even moreimportant due to improved resolution. Stability of gain is moreimportant due to higher count rates (to achieve better statisticalprecision), faster logging speeds giving faster changes to count rates,faster logging speed requiring shorter acquisition times for spectra,and use of neutron generators adding more potential for count ratechanges. This makes compensation for count-rate induced gain changesnecessary.

Various theories have been put forth to explain the effect, and each mayhave merit. Theories include space charge effects, charge layers on PMTdynodes, voltage redistribution among dynodes, and so on. It may not beclear which modes are in effect for a given system, but theseexplanations do share one common aspect—more events are measured andmore charge is passing through the PMT 204 for a given time interval.This puts more load or stress on the PMT 204 and its bias supply 206,and appears to result in the observed gain shifts.

Slow gain regulation is implemented by executing an algorithm on thecontroller 214 that acquires spectra and analyzes the spectra todetermine gain or gain error. For example, the controller 214 isconfigured to calculate if a gamma-ray peak is in the correct bin, andif not, how far from the correct bin is the deviation. The resultingerror is used to adjust the bias supply 206 (high voltage, HV) to thePMT 204. Depending on the spectral calculation being performed, thisprocess repeats every 3 to 10 seconds—at a much slower than the rate atwhich formations are being traversed. Effective loop gain is typicallyless than one, thus several cycles of the control loop are used to nullthe error. An additional more rapidly responding method is needed tohandle gain variation between updates from the slow gain regulationalgorithm.

Consideration of PMT loading led to the one aspect of the presentdisclosure—to modify the HV applied to the PMT 204 in anticipation ofthe gain change that may occur. The anticipated gain change can beinferred by examining in real-time the load on the PMT 204. In oneembodiment, the loading is represented by the observed total count rate(TCR). In another embodiment, the load on the PMT 204 is the amount ofcharge produced (at the PMT anode) in a given time interval, i.e. theanode current. Anode current is a reasonable driver of the gaindistortion as it is proportional both to the number of events and to theaverage amplitude (energy) of the events, and represents gross chargebehavior inside the PMT 204. This is analogous to the integral of thespectrum.

Digital pulse height analyzers (PHA) implemented in digital electronics,such as processors, readily support real-time generation of computedterms such as total count rate (TCR) and total integrated charge (TCI).In the system 200, these terms are produced at 125 ms intervals. TCRreports the total counts during each interval, and is subject to pile-upeffects, especially at higher count rates. TCI is slightly more complex,but more robust. TCI is computed by summing all observed current fromthe PMT 204 anode for all events, including pile-ups. Any DC (baseline)current from the PMT 204 is excluded from TCI, as this does not reflectgamma-ray events. Because TCI is acquired over fixed intervals, it canbe viewed as either charge or current (charge per time interval).

The preferred embodiment employs TCI, which represents the current loadon the PMT 204, to measure in real-time the stimuli on the PMT 204inducing gain variation. This measurement is then used to estimate theamount of HV change to compensate for the anticipated gain variation.The TCI measurement, computation, and HV change are performed every 125ms, much faster than the rate at which formations are traversed (andaccordingly, faster than the rate at which acquisition measurements areperformed).

Early experiments on several models of PMTs indicated a possiblelogarithmic effect—to correct the gain error induced by a count ratechange uses an incremental change in HV related to the log of countrate. More detailed experiments on a selected PMT model were performedto explore the relationship between TCI and HV adjustments. These areshown in FIG. 3, where the change in HV in volts is plotted vs ln₂(TCI), where TCI is in arbitrary units of charge per time interval.Note that PMT HV is approximately 1200V for these experiments, so theentire y-axis range is less than 2% of the nominal HV. In anyembodiment, the relationship between a given system performanceindicator (such as TCI) and a gain adjustment (such as HV) can be mappedand determined experimentally, such that once the tool is in use, thegain adjustment for a given load can be looked up.

The points labeled “SFT-178” are measured in a test tank (water-filled)at varying source strength. The points labeled “EECF” are measured in aporous rock formation at varying source strength. The two series arenormalized at ln ₂(TCI)—22. A straight-line fit reasonably approximatesthe data, with some fitting error explained by continuing PMT thermaldrift during the experiments.

The slope here of approximately −2.9V per doubling of TCI represents theempirical characteristic for the particular PMT unit used in thisexperiment. (2.9V is equivalent to approximately 1.5% gain change inthis case.) Other PMT units may use a slightly different slope. This canbe easily calibrated at time of manufacture for a particular instance ofa spectroscopy system by measuring two points—one at nominal sourceoutput and one at say 25% source output. Early data show littledifference in slope between different units in the same model series. Itis also possible to dynamically calibrate the slope during well loggingby adjusting the slope until overall gain regulation shows the leastsensitivity to TCI (or TCR) changes.

Note that other PMT models may use a much different slope. PMTs withsignificant design and/or processing changes, or with very differentbias supply structures, may use a different functional form from thatshown here. For some systems, the relationship may be better representedby percent change of HV, instead of a direct voltage change. This can beuseful if each PMT has a very different operating HV. The experimentsand technique for deriving the form, and for calibrating individualunits are similar.

In the present disclosure, overall system gain regulation is implementedby overlaying the slower closed-loop algorithm with the faster open-loopalgorithm. The two methods are joined in parallel because they operateat different cycle times and to minimize cross-talk. The complete gainregulation system is shown in FIG. 4.

As can be seen, the slower closed-loop algorithm analyzes accumulatedspectra to determine gain error and adjusts the HV setting to effect acorrection. This entire process takes approximately 10 seconds in thepresent embodiment, with most of that time spent collecting sufficientspectral data to achieve a usable statistical uncertainty for the gainerror calculations because the calculation uses a minimum number oftotal counts to be acquired. This closed-loop algorithm maintains longterm stability and is the reference for gain accuracy.

The open-loop algorithm examines TCI every 125 ms and computes a newfast HV correction term. The fast term is added to the latest slow termand used to set the PMT HV. On the next 125 ms cycle, a new fast term isadded to the slow term, and so on. Since the fast term is updated 80times between each slow term update, it is the fast term thatcompensates for rapid changes in count rate and energy distribution (perTCI).

In one embodiment, the fast term is added to the slow term.Alternatively, the fast term can be computed as a percentage instead ofa voltage, and then this percentage used to temporarily raise or lowerthe slow term by the fast percentage. This is a multiplicative approach,instead of additive. Since the fast term is small compared to the slowterm, both additive and multiplicative methods are similar here.Situations with different PMT models or detector types may betterutilize a multiplicative approach.

Another consideration is the timing of the fast term. The cycling ratecan, of course, be adapted as desired. Or, a filter can be added to thefast term (pole or zero or more complex) to slow down or speed upapplication of the fast term. It was found in this approach thatadditional filtering was not needed, since the PMT HV supply includedfiltering in its response to setting changes which provided acceptableand reasonably matched response time behavior.

The slow closed-loop and fast open-loop algorithms can be tunedseparately. This approach is preferred for the slow loop. The slowclosed-loop algorithm can be tuned using methods that would be employedwere a fast loop not present. The fast loop is preferably disabledduring tuning of the slow loop.

The fast loop is preferably tuned by rapidly changing source output andnoting the gain error of spectra in real-time (not just every 10seconds). Only the slope ΔHV/Δ(ln ₂(TCI)) is tuned in this manner.Successful tuning occurs when no HV change was used from the slow loopand all real-time spectra showed no gain errors. If the latter occurs,then a fast-term filter may be helpful and its timing tuned to minimizegain error artifacts during count rate changes.

EXAMPLES

Two test wells were logged from bottom to top with the combined slowclosed-loop and fast open-loop gain regulation method of the presentdisclosure. In each case the performance of gain regulation can beobserved by monitoring the behavior of TCR, TCI, the fast HV term, theslow HV term, and gain error. Well #1 is a shallow well (70 ft) with astack of short test formations with varying properties giving rapidchanges in count rate over short vertical distances. Well #2 is a deeperwell (3300 ft) with several rapid transitions separated by longdistances of slowly varying formations. This well includes a sharptransition from open hole to casing which slightly changed count rate(curve SDTCR), but markedly changed energy distributions (curve SDTCI).

Throughout these wells, gain regulation held gain error (curve SDGRGAI)within a small band, deviating from nominal gain by +/−0.1%. Gainregulation slow (curve SDGRVZ) and fast (curve SDHVFD) terms were activethroughout the log. On the longer run in well #2 the slow term can beseen compensating for what appears to be thermal drift (more rapidcorrections as the detector first starts warming up, slower as it nearsthermal equilibrium), as would be expected. Total count rate (SDTCR)varied over a range of 1.22:1 in Well #1 and 1.42:1 in Well #2.

The fast term (SDHVFD) is driven by TCI (SDTCI). If TCI goes up in a 125ms cycle, the fast term is driven down to compensate at the start of thenext 125 ms cycle. On both runs TCI and the fast term are active,especially when the environment around the detector is changing. Theslow term is updated approximately every 10 seconds, two orders ofmagnitude slower than the fast term.

In Well #1 shown in FIG. 5, fast term activity is seen at numerousformation boundaries. The fast term spans a 1.2V range, whichcorresponds to 0.6% gain compensation, yet the log shows gain changesare contained within +/−0.1%, with standard deviation of 0.05%. Thisindicates that the fast term is successfully suppressing gaindisturbances.

In Well #2 shown in FIG. 6 (top section) and FIG. 7 (bottom section),the fast term is particularly active when entering casing at 330 ft andwhen transitioning from brine to fresh water in the borehole between2300 and 2400 ft. Smaller and sharper fast term activity is seen atvarious places in the well (e.g. near 2100 ft), assumed to be due tonumerous causes—hole condition, source effects, and formation changes.The fast term spans a 2.5V range, which corresponds to 1.3% gaincompensation, yet the log shows gain changes are contained within ±0.1%,with standard deviation of 0.05%. This indicates that the fast term issuccessfully suppressing gain disturbances over the entire log.

Advantages may include:

Gain stability—the methods of this disclosure provide markedimprovements in gain stability over the entire course of logging a well.

Improved resolution—Stable and accurate gain produces better overallresolution when stacking data over multiple time or depth intervals. Themethods of this disclosure improve measurement performance and reducecostly post-processing remedial actions to attempt to fix gain errors.It also prevents measurement error due to spectral distortions, whichmay or may not be discovered.

Additional downhole resources not necessary—The open-loop technique issufficiently simple and direct that implementation in a harsh andlimited downhole environment may not use extraordinary resources inhardware, computing power, computing time, software development, and thelike.

Uphole resources—The technique reduces real-time demands on the slower,often highly complex closed-loop gain regulation processing used forultimate spectral accuracy. As such, larger and more complex processingmay be located uphole (for wireline and wired drill-pipe applications)in a benign environment with higher computing power and more efficientsoftware development. In applications without adequate surfacecommunication (logging while drilling, logging while tripping, slickline, etc.), less performant downhole resources can be used for theslower closed-loop processing and the cycle time extended, saving onhardware development and power.

Simplified calibration—The technique allows for simple calibration,which may be adequate for the life of a spectroscopy acquisition system,and may be adequate for all units in a given model design. If helpful,it is possible to dynamically calibrate by observing correlation betweenTCI and gain error, and adjusting the calibration to minimize thiscorrelation.

Simplicity—Though lengthy text is presented here to describe the system,the concept can be implemented in a straight-forward manner. The overlayof two control loops, one fast and the other slow, lends itself tosimple design, testing, and tuning.

Robust—The open-loop, empirical approach can be reliably implementedwith minimal cross-talk between loops and with minimal concern for loopinstability. This is due to the large difference in update rates and tothe very low coupling between gain and TCI, placing the open-loop veryfar from instability conditions.

One can extend or modify the techniques discussed herein to achieveopen-loop gain regulation for similar spectroscopy systems. A key stepin development of such systems is to identify the stimuli, or systemperformance indicators, that cause or correlate to gain changes in thesystem. These include, but are not limited to Total count rate, Peakcount rate, Total integrated charge, Anode current, Dynode current, Biassupply loading (e.g. output current), System Live-time, SystemDead-time, Pile-up rate, and analogs of the above.

Some gamma-ray systems are used for counting, not for spectroscopy. Suchsystems could be considered a single bin spectrum, and can also benefitfrom this approach to stabilize the gain and/or pulse-heightdiscriminator setting as a function of TCI or similar stimuli. This canimprove accuracy over a wide range of count rates.

As shown here, the open-loop output is added to the closed-loop output.Alternatively, the correction signal from the open-loop gain regulationmay be applied as a fractional increase to the closed-loop signal, i.e.in a multiplicative manner.

The methods described here can be readily extended to provide fastcompensation for other spectroscopy effects such as offset or linearity.Signals such as those listed above can be evaluated for suitability todrive an open-loop control system, appropriate transforms derived, and afast term correction signal produced.

Gain adjustment can be affected by means other than bias supplyadjustment. Means can include, but are not limited to, variable gainamplifiers, digital gain adjustment, re-binning of spectra, and so on.Note that discrete approaches such as re-binning or digital gainadjustment may introduce distortion artifacts into the gain-adjustedspectrum. Analog adjustment techniques are preferred.

While the disclosure is described in the context of using ascintillation detector coupled to a photomultiplier, it would applyequally to a scintillation detector coupled to another photon-electronconverter like a silicon photomultiplier or another light sensitivedetection and/or amplification device. Possible scintillation materialsto be used with this disclosure are NaI(Tl) (Thallium-doped sodiumiodide), CsI(Na) or CsI(Tl) (sodium or thallium doped cesium iodide),BGO (Bismuth Germanate), GSO:Ce (Ce-doped GadoliniumOxy-Ortho-Silicate), LPS:Ce (Ce-doped Lutetium-pyrosilicate), LaBr3:Ce,LaCl3:Ce, LuAP:Ce, LuAG:Pr, YAP:Ce, YAP:Pr, SrI2:Eu and many more. Thedisclosure can also be applied to systems based on detectors whichdirectly produce an electrical signal, without need of an additionalphoton detector.

While the disclosure has been explained with respect to a limited numberof embodiments, those skilled in the art, having the benefit of thisdisclosure, will appreciate numerous modifications and variationstherefrom. It is intended that the appended claims cover suchmodifications and variations as fall within the true spirit and scope ofthe disclosure.

What is claimed is:
 1. A gamma-ray spectroscopy system comprising: adetector configured to generate a signal indicative of energy arrivingat the detector; and a controller comprising a processor configured to:determine one or more system performance indicators; compute a firstgain correction term based on the one or more system performanceindicators over a first time period; identify one or more measuredspectral features based on the signal; compute a second gain correctionterm based on the one or more measured spectral features over a secondtime period; and adjust a device gain of the gamma-ray spectroscopysystem based on a combination of the first gain correction and thesecond gain correction determined at each conclusion of the first timeperiod.
 2. The system of claim 1, wherein the one or more systemperformance indicators comprises an indication of system performanceobtained more quickly than the one or more measured spectral featuresare identified.
 3. The system of claim 2, wherein the system performanceindicator is obtained approximately every 125 milliseconds and themeasured spectral features are identified approximately every 10seconds.
 4. The system of claim 1, wherein the controller computes thefirst gain correction term concurrently at a first rate while computingthe second gain correction term at a slower second rate.
 5. The systemof claim 1, wherein the one or more system performance indicatorscomprises a total count rate at the detector, peak count rate at thedetector, average detector current, a peak detector current, or acombination thereof.
 6. The system of claim 1, wherein the combinationcomprises the first gain correction term added to the second gaincorrection term to result in an amount by which the device gain isadjusted.
 7. The system of claim 1, wherein the combination comprisesthe second gain correction term mathematically manipulated by the firstgain correction term to result in an amount by which the device gain isadjusted.
 8. The system of claim 1, further comprising an amplifyingdevice coupled to the detector, wherein the controller is furtherconfigured to adjust the device gain by changing a gain of theamplifying device configured to amplify the signal output from thedetector.
 9. The system of claim 1, wherein the controller is furtherconfigured to adjust the device gain by redistributing the signalindicative of energy arriving at the detector digitally into a pluralityof bins of a spectral histogram.
 10. The system of claim 1, the detectorfurther comprising a scintillator and photomultiplier, wherein thecontroller is further configured to change the device gain by increasingor decreasing a voltage applied at the photomultiplier.
 11. The systemof claim 10, wherein the one or more system performance indicatorscomprises a peak current in the photomultiplier or a peak count rate inthe photomultiplier.
 12. The system of claim 1, wherein the one or moresystem performance indicators comprises an average photomultipliercurrent in a sampling interval.
 13. The system of claim 1, wherein theone or more system performance indicators comprises an average countrate of the detector over a sampling interval.
 14. The system of claim1, wherein the one or more system performance indicators comprises anaverage count rate multiplied by an average observed deposited energy.15. The system according to claim 1, wherein a relationship between thefirst gain correction term and a given one of the one or more systemperformance indicators is pre-determined or determined dynamically. 16.A system comprising a gamma-ray spectroscopy instrument comprising: adetector configured to generate a signal indicative of energy arrivingat the detector; a controller comprising a processor configured to:determine one or more system performance indicators and one or moremeasured spectral features; generate a combined gain adjustment of anopen-loop gain adjustment and a closed-loop gain adjustment, wherein theopen-loop gain adjustment is based on the one or more system performanceindicators and the closed-loop gain adjustment is based on the one ormore measured spectral features; and adjust a device gain of thegamma-ray spectroscopy instrument based at least in part on the combinedgain adjustment.
 17. The system of claim 16, wherein the open-loop gainadjustment is generated over a first time period, and the closed-loopgain adjustment is generated over a second time period, wherein thefirst time period is shorter than the second time period.
 18. The systemof claim 17, wherein the first time period is approximately 125milliseconds and the second time period is approximately every 10seconds.
 19. The system of claim 16, wherein the closed-loop gainadjustment is generated at a slower rate than the open-loop gainadjustment.
 20. The system of claim 19, wherein the closed-loop gainadjustment is performed at rate approximately two orders of magnitudeslower than the open-loop gain adjustment.